package org.tea.inventory.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.tea.inventory.dao.tea.SupplierQualifiedMapper;
import org.tea.inventory.domain.tea.SupplierQualified;
import org.tea.inventory.service.ISupplierQualifiedService;

import java.util.List;

/**
 * 供应商资质Service业务层处理
 * 
 * @author dongxb
 * @date 2025-04-14
 */
@Service
public class SupplierQualifiedServiceImpl implements ISupplierQualifiedService
{
    @Autowired
    private SupplierQualifiedMapper supplierQualifiedMapper;

    /**
     * 查询供应商资质
     * 
     * @param id 供应商资质主键
     * @return 供应商资质
     */
    @Override
    public SupplierQualified selectSupplierQualifiedById(Long id)
    {
        return supplierQualifiedMapper.selectSupplierQualifiedById(id);
    }

    /**
     * 查询供应商资质列表
     * 
     * @param supplierQualified 供应商资质
     * @return 供应商资质
     */
    @Override
    public List<SupplierQualified> selectSupplierQualifiedList(SupplierQualified supplierQualified)
    {
        return supplierQualifiedMapper.selectSupplierQualifiedList(supplierQualified);
    }

    /**
     * 新增供应商资质
     * 
     * @param supplierQualified 供应商资质
     * @return 结果
     */
    @Override
    public int insertSupplierQualified(SupplierQualified supplierQualified)
    {
        return supplierQualifiedMapper.insertSupplierQualified(supplierQualified);
    }

    /**
     * 修改供应商资质
     * 
     * @param supplierQualified 供应商资质
     * @return 结果
     */
    @Override
    public int updateSupplierQualified(SupplierQualified supplierQualified)
    {
        return supplierQualifiedMapper.updateSupplierQualified(supplierQualified);
    }

    /**
     * 批量删除供应商资质
     * 
     * @param ids 需要删除的供应商资质主键
     * @return 结果
     */
    @Override
    public int deleteSupplierQualifiedByIds(Long[] ids)
    {
        return supplierQualifiedMapper.deleteSupplierQualifiedByIds(ids);
    }

    /**
     * 删除供应商资质信息
     * 
     * @param id 供应商资质主键
     * @return 结果
     */
    @Override
    public int deleteSupplierQualifiedById(Long id)
    {
        return supplierQualifiedMapper.deleteSupplierQualifiedById(id);
    }
}
